.loading4 .item {
  width: 100px;
  height: 100px;
  border: 10px solid crimson;
  margin: 0 auto;
  margin-top: 90px;
  animation: loading4-box 2s infinite 0s;
}

.loading4 .item::before {
  content: '';
  display: inline-block;
  vertical-align: top;
  width: 100px;
  height: 0px;
  background-color: crimson;
  animation: loading4 2s infinite 0s;
}

@keyframes loading4-box {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  75% {
    transform: rotate(180deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes loading4 {
  0% {
    height: 0px;
  }
  25% {
    height: 100px;
  }
  50% {
    height: 100px;
  }
  75% {
    height: 0px;
  }
  100% {
    height: 0px;
  }
}